Skip to content

test(desktop): pin the About reader's missing-provider throw - #4905

Merged
me2seeks merged 1 commit into
apache:mainfrom
chihumyum:test/app-update-about-reader-throw
Sep 8, 2026
Merged

test(desktop): pin the About reader's missing-provider throw#4905
me2seeks merged 1 commit into
apache:mainfrom
chihumyum:test/app-update-about-reader-throw

Conversation

@chihumyum

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #4498, taking the two non-blocking P3s from the re-review; the commit carrying them was pushed after the merge, so it lands here.

  • AppUpdateAboutProjectionConsumer throws when mounted outside AppUpdateProvider, but app-update-provider-scope.test.ts covered only the mounted path. Add the assert.throws render case (React's act rethrows the uncaught render error) and assert the reader's callback never ran.
  • trim the AboutUpdateStatusRow doc comment to the sentence the next editor needs, that it is a component because the action guard is a hook; the ownership argument lives in refactor(desktop): move App Update controller below AppShell #4498's body.

Refs #4582

Verification

  • Node 24: desktop test:dist 2312/2312, @maka/desktop typecheck, lint, format:check
  • check:renderer-architecture --base upstream/main, check:app-shell-hooks, Astryx inventory, Knip (apps/desktop), ASF headers, git diff --check
  • the new case fails when the Consumer's throw is replaced by return null (checked locally before pushing)

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code wrote the test case and the comment trim and ran the verification; the human contributor reviewed the work and chose to submit it.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

`AppUpdateAboutProjectionConsumer` throws when mounted outside
`AppUpdateProvider`; the scope suite covered only the mounted path.
Add the `assert.throws` render case, and trim the `AboutUpdateStatusRow`
doc comment to the sentence the next editor needs (the ownership
argument now lives in the PR body).

@hqhq1025 hqhq1025 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No substantiated findings at 8269d2d. The new test mounts the actual AppUpdateAboutProjectionConsumer without its provider, verifies the missing-provider error and ensures the projection callback never runs (app-update-provider-scope.test.ts:260; app-update-projection-context.ts:34). The other change is comment-only.

The full build:test succeeds after applying the repository's required dependency patches, and all four provider-scope tests pass. A production-only load-hook mutation replacing the consumer's throw with a quiet return makes the new test fail with Missing expected exception, confirming it distinguishes the prohibited fallback. No full Desktop suite or live Electron UI run was performed. No blocker found within this test-focused scope; this is not an approval.

Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.

@me2seeks me2seeks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by OpenAI Codex, operated by me2seeks, at 8269d2d37e08b62c2aa8541d945e3104149c59ea. This is an automated technical assessment, not an independent human review. Approval is submitted at the operator's explicit direction.

No actionable findings. The new test renders the actual About projection consumer outside its provider and requires both the missing-provider throw and zero projection callback executions. The consumer currently throws before invoking that callback; a quiet fallback fails assert.throws. The only production-file edit trims a comment.

  1. Optimal for the actual problem: Yes; the change addresses the defect at its existing owner.
  2. Production code that can be deleted: None identified.
  3. Low-quality tests that can be deleted or replaced: None identified.
  4. Deeper refactor: No deeper refactor is needed.
  5. Ready to merge: Content is ready; merge remains conditional on current required checks and conflict state.
  6. Residual risks / verification: Checked the consumer, fake renderer, per-test cleanup, and exact diff; required hosted test passed. Existing independent automated review also reports a throw-to-null mutation failure; that mutation was not rerun locally. No protected-area effect identified in this diff.

@me2seeks
me2seeks merged commit 994a80d into apache:main Sep 8, 2026
2 checks passed
@chihumyum
chihumyum deleted the test/app-update-about-reader-throw branch September 8, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants